# -*- coding:utf-8 -*-

# @Time    : 18-11-12 下午9:50

# @Author  : Swing


import tensorflow as tf

# print(tf.__version__)

a = tf.constant(0)
b = tf.constant(1)

print(a)

c = tf.add(a, b)

print(c)

mat_a = tf.constant([[1, 1, 1], [3, 3, 3]])
mat_b = tf.constant([[2, 2, 2], [4, 4, 4]])

mat_a_b = mat_a * mat_b

tf_mat_a_b = tf.multiply(mat_a, mat_b)

tf_mat_mu_a_b = tf.matmul(mat_a, tf.transpose(mat_b))

this_graph = tf.get_default_graph()
this_graph_def = this_graph.as_graph_def()

print(this_graph_def)

sess = tf.Session()

tf_mat_mu_a_b_value = sess.run([tf_mat_mu_a_b])

print(tf_mat_mu_a_b_value)